#ifndef USER_H
#define USER_H

#include <QString>
#include <QVector>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include <QObject>
#include <QFile>
#include <QTextStream>
#include "games.h"

class user : QObject
{
    Q_OBJECT
private slots:
    void saveImage(QNetworkReply *);

public:
    user();
    ~user();
    void setGameList(QVector<QString > gameL);
    void setParam(QString pseudo, QString pseudoV, QString email,
                  bool dev, int id);
    QString getPseudo();
    QString getVisiblePseudo();
    QString getEmail();
    bool    isDev();
    int     getId();
    QVector<Games* > &getGameList();


private:
    void downloadImage(QString httpimage);
    QVector<Games* > m_gameList;
    QString         m_pseudo;
    QString         m_visiblePseudo;
    QString         m_email;
    QString         m_image;
    int             m_id;
    bool            m_dev;
};

#endif // USER_H
